#include <stdio.h>

void bubble_sort(int arr[], int n)
{
    int i, j, tmp;

    for (i=0; i<n-1; i++) {
        for (j=0; j<n-i-1; j++) {
            if (arr[j] > arr[j+1]) {
                tmp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = tmp;
            }
        }
    }
}

int main(int argc, char *argv[])
{
    int i;
    int arr[7] = { 5,4,7,6,1,3,2};

    bubble_sort(arr, 7);

    for (i = 0; i < 7; ++i) {
        printf("%d, ", arr[i]);
    }
    printf("\n");
    
    return 0;
}

